﻿#region License
// /* **************************************************************
// * Copyright (C) intex Consulting GmbH - All Rights Reserved    *
// *--------------------------------------------------------------*
// * Unauthorized copying of this file, via any medium is         *
// * strictly prohibited                                          *
// *--------------------------------------------------------------*
// * Proprietary and confidential                                 *
// *--------------------------------------------------------------*
// * Dissasembling/modifications strictly prohibited!             *
// ***************************************************************/
#endregion

using System;
using System.Diagnostics.CodeAnalysis;
using ComHlp.enums.Fields;

namespace ComHlp.ContentClasses.VirtualControls.LView
{
    [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")]
    public class ItxListViewColumn : ICloneable
    {
        // <summary> 1 char listview number </summary>
        public int ListViewNo { get; set; }

        /// <summary> column position </summary>
        public int ColumnPosition { get; set; }

        /// <summary> Internal field name, used for sort on server side </summary>
        public string SortFieldOrIconHint { get; set; }

        // <summary> 5 chars length </summary>
        public int Length { get; set; }

        // <summary> 1 stelle typ (Ueberschrift/Zeile) </summary>
        public char Type { get; set; }

        // <summary> 1 stelle feldtyp (char/unparsed) </summary>
        public char Ds12TypeChar { get; set; }

        public ItxListViewDs12Type Ds12Type { get; set; }

        // <summary> 2 stellen vorkomma </summary>
        public int PreComma { get; set; }

        // <summary> 1 stelle nachkomma  </summary>
        public int PostComma { get; set; }

        // <summary> aufbereitung laut ds12 2 stellen </summary>
        public string Ds12Aufb { get; set; } = "";

        // <summary> 1 stelle - Feld ST aus DS12 - true == Hide Vertical line  </summary>
        public bool Ds12DisplayVerticalLine { get; set; }

        // <summary> 1 stelle  </summary>
        public EItxSortMode Ds12Sort { get; set; }

        // <summary> default vm for this col </summary>
        public string DefaultVm { get; set; }

        // <summary> text in length elementlength </summary>
        public string Text { get; set; } = "";

        /// <summary> Column with icon? </summary>
        public bool IsIconColumn { get; set; }

        public int CurrentScreenNo { get; set; } = -1;

        /// <summary> allow sorting/grouping/whatever for specified column </summary>
        public bool AllowActions { get; set; }
        
        /// <summary> z-column indicated hyperinfo </summary>
        public bool ZColHyperInfo { get; set; }

        /// <summary> column with rgb? </summary>
        public bool IsRgbColumn { get; set; }


        object ICloneable.Clone()
        {
            return Clone();
        }
        public ItxListViewColumn Clone()
        {
            return MemberwiseClone() as ItxListViewColumn;
        }
    }
}